extract get command into it's own fucn