refactor model into own file to make it nice and clean