Added new callPage method and did some refactoring