add inner collision function