added unit tests for documented functionality