implemented more logic for collision detection system using more typed array pointer shinanigans