Simplified code for conversions