added sleep between kill checks, updated for more efficient "if" logic