updated for version 3