initial code with tests