updated gget function to reduce SLOC