corrected controller now working