Added method to avoid "complex" query in the controller