basic collision detection structure