added getter and setter functions

added getter and setter functions and changed the names of some
variables