Added security logic