able to access variable in controller