added comments, listener to edit button and dialog