whitespace + redundancy eliminated
tests moved to a separate file