add base constructor for different sources of types