finalized for version 3