updates only if data is set