changes to controller logic