added async and before trigger