add security function