clarify
move utility functions to top level