completed crossing function