added basic pixel processing. It is very buggy at the moment but works. This will need to be improved later.