change functions to use object accessors