fixed some bugs and added many new feature