Moved filter out of testing