Added functions for type conversions