Solution to test questions