pseudo-coded controllers