use match/3 instead of match_parts/3