made dist_to_boundary and dist_to_collision inherited