Code from version v2.0 RC3