indentation. added a factoring algorithm to compare results