added is_scalar function and also updated derived so that can now specify model number