Assignment 3 methods implemented.