adapt solutions to use functions as they are view earlier externalize code to be dowloadable for student