coloring problem
first version
bug fix and add check
point 38
add swap although no use now