back end code ok, ready to write unit tests