changed encapsulation on ChatSecurity