add chap2.hpp

create my own rotate function, efficience have not yet been tested.