refactored model->findAll() for better join performance