create a viewpager

+ improvements and fixed some old bugs