first code for exercise 5 from lint pool