works but we will have to get rid of the 'hit' function