initial code and tests