update code to use collision detection and add frienemy class