added else switch to avoid TypeDescriptor call