getting the type name through reflection