updated for page scaling