A "trivial" (easy to understand but not practical) conversion function