moved chat creation and finding to model
missing end
minor refactor