split a separate functions section. Added filter function