ryu's original code without any modification