adding logic when read data from server