added unit tests and acceptance tests