changed to give controller an int