added fetch method which combines get and set