added getter

created a getter and created a function that will hold the private
variable