fetch method is modified to work