Created a converter function for the data