The main functions of the stem are