moved test to controller