added params "type" in example call
added checks for different conversions