somewhat working mysql version - need to change code for async data access