modify model and add some convinent methods
rewrite some util