added delete and replace functions - still need to think about them