get out models logic from routes