added method to determine screensize programatically