first attempt at controller