moved filter logic to model #7