changed insertcoin to be called by min and max