[minor] implement delete and refactor before slightly