add pages controller
change view format from html to json
add view index and count