defined a program that served as a solution

to my problem