Yes, felt kind of cumbersome when i wrote it. Will try and devise a way to refactor.