fixed moneysupply function