Beta functions and anomalous dimensions up to three loops