cleaned up use of object's internal variables