Another program I wrote to help 'mine'