Added Gather functions

Gather functions return a trace in a variable