Add better fetch function

Change-Id: I013c491d1286e2febf87670c134d6e56d9319d51