Finally finished the conversion functions. They work