added edit mode
fixed merge