added type casting support