add order & solve some bugs