Pages Controller added
refactored code 1