add finish command and refactor Reverse func