added implementation of fetch