prepare code for version 2