adding my script to solve problem 5