Maybe throw an error if type is unsupported here?