branch off code from  #DevBytes on Sliding Fragments is from +Daniel Olshansky.