refactor/secure