redoing the way I did my controller