make inflatData function more robost