updated #11 solution to use external file