Big update, need somes tests for resolve the bugs