Solution to morning exercise