refactored

refactored with edit ui working