add docs and format return strings with %g