implemented selfmade Threadpooling called R2D2