minor refactor since I found a better way to do hash based subs