add methods for JSON
update and refactor pages