added Queue import
initilized threads in init
merged refactoring