add permission and async thread