Finished exercies 12.1 and 12.2 from book in go.