Optimize codes of creating ring#2