add isSecure method