add sequence box and fix some bugs