added unit tests to controllers