editing and deleting improvements