Done and tested upto histogram.
Commited assign 2 to very badly done.