export collect routine
solutions to 4.38, 4.39 and 4.40
solution to 4.41 and 4.42
solution to 4.43
Solution to 4.44. A bit too verbose. Can be improved by better
board representation.