refactory security