add a weird helper
refactor
refactor function
cleanup
still crap like hell..but will come out