Added function f to Controller