quick refactor to fix minor stupidity