Red black tree by lua