main security improvements