converting server data to new structure