add type cast support