made a buggy version of the kill function