turned all functions async, added callbacks