Removed 'for' loop from problem 8