added unit tests and enter to update