genericizing the code
genericizing conversion