add type safety to x0r