adding if typematch is true or not