added type factory