security logic made sync using async