do security refactory