rearranging mid/high level functions, renaming