added online status and refactored tests