add back online function to store data function