rot: minor update to rot function