Possibly really inefficient with the looping, but trying it none-the-less.