Slight refactor
I'm a fucking idiot.
Created a generator that can be used elsewhere