fixed some bugs, and now ok!