added async functionality