First code and tests