Ben/controller pseudocode