switched to using a foreach loop and inverted quote syntax style