seperate generic function (eformat) for formatting