quick refactor
wee kinda working