This code is duplicated with the content of `show_add`, you may just refer to it.