thread rdy,todo: tailrec arrays