slightly better orginization of controller