with class and threading with queue concept