get main code to compile - tests not yet