add edit and fix bug