Added switch[4] to function such that we switch between color output when switch on, and edge output when switch off. Note that we do not have grayscale output as of now. Ran out of swtiches