Make it more readable and independent to adapt for different devices Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>