started to wark at status bar and cleaned separed the logic