moved _help functions to be inside main functions