type check added