updated for version 4