outline of the conversion algorithm