change controllers methods to models methods