fixed position spelling error in css
refactored page counting