finish draft of controller pseudocode