Scrapped current version of min_num_coins, got helper function min to work