Use convert.
Parameterize long bool.
Preliminary version with debugging output.