old version of ropes.nim to prevent merge conflicts