refacoring started Global var added
fix audio
refactored but added issue of reconnecting