created test code to generate a grayscale gradient as an excersize