Return result in format expected by the elisp