making it more idomatic

wip not ready yet