refractoring done. Moving to filtering