added unit test + splitted controller