commented out bug in delete function causing segfault