updated for version 2