Solution to this assignment