Updated code for version 2.3.