format some codes