Updated for version 4