added delete function, closes #1