implementing a two four tree for prime number management