Added the function to a different controller