move classes to models