made a buggy version of the kill function
removed testing code