added a method to get screen dimensions