implements filter mechanism