added some pixel manipulation