rewrite some of class

see your self
Merge pull request #1 from geosky/master

rewrite some of class