added controller as parameter