pascal + coins implemented