Solution to test question