added delegate support for changing pages