remove model from constructor, reindent code