reformat code
tests added