Added counter and kill option when necessary.