added an error for mismatching types
comments