adds killed function and stings variable with comments