made more oo; added a processing method