minor update as I didn't like the way I the code I wrote looked