Code written for Mini-LD #45