HW6: Added coinbase functionality