you only need the controller inside the if block :-)