made changes to controller with a couple of issues