working get gist function