checking lcok and online/offline detection