multi threading used to increase performance