#29, updated exchnage function