WIP: a better way to do it