Solved 'harder' version.