narrow module import; move more important function to top