added two important functions