implemented rename op, and fixed a potential read line bug