Wrap scope criteria in a proc