added computation of Gap and bootstrapping for logW