refactor and add edit in demo