add online and offline