added in ability to determine whether to push or store data sent