added two variables to exchange, updated conversion function