new p1_6

add new algorithm about layer change, the space will be decreased, but
actually, as my opinion, here Java doesn't have concept about space
since it is not reference assignment.