small implementation of a red-black tree