use match case instead of if else