Joined new code with original project
Finished pivoting strategies fixes #49 #47