some minor changes for controller logic