combining conversion function with conversion protocols