security classes refactoring