the function 'detectCollisions' is added to side server