use only one intermediate datatype