improve seconds of problem3 from 10s+ to 0.2s-