solutions in golang, 7-9