moving functional test to controllers