Moved convertions to seperate functions