changed for and filter