added methods and private variables