added constrain to page width and height