working on paint (fixing sort)