Updated for version 3