Adding event to change page