small improvements to delete and create