Added multi threading for UI