adding in color filtering code.  Mostly unmodified as of yet