added code we wrote in class