add a security check