use value by reference for controller funcs