added online status check