separated Filter function from context for grayscale. examining method chaining vs i-o approach