Implemented the first two methods.