changed to make it work on more than two hits. Now should work on any number of hits