compiles but issues with exchange quantities equal to 0