added check for isModel