getting initial code into shape with some tests