Lab 1 modified to take use of encapsulation