solution using converters