updated online/offline feature