improving conversion functions