implemented contact callbacks into simulation