added single and double rotation implementation