added trace and collision detection