progress on controller logic