conversion i u x o and flags, testing to be finished