updated controller, will implement pattern soon