updated the algorithm that chooses which part that should be sorted
changed the comparator of pixels so that bright pixels will be in the top of the picture