implemented "fetch" command