also moved the function call from home controller to activities controller