added heartbeat API
refactored sonar API