moved code for adding page class to body