added edit mode