getCoins method added and some fixes