use map for type conversion without function