refactor security classes