Implemented histogram stretching