move conditions from proc to class