save viewflipper state
refactoring