add some shape algorithm