various improvements for the conversion