added the feature to choose automatic or manual protection