updated for controller as a variable