it's not very good style to have multiple switch statements. Can we have a single switch on the datatype and interpolation, where you will put all the relevant code?