Some useful go functions