refactored match rink-code