Added viewpager functions