two functions of endoplasmic reticulum