beginning new functional approach
grayscale array fn
refactoring for simplicity
refactored for simplicity