seperated out hash controller, made a model controller