add online and offline checking