added controller. working out the kinks