finalize everything