cleaned up the grescale class - works but is relatively slow