Added code to validate screen size