added async processing function