several security improvements and chapter selection in lecture