add more feature and fixed some bugs.