upload stem function