changed autorename format; fixed bug in autorename; wrote tests for autorename