adding tests, changing controller method