[INPROGRESS] Use async to manage parallel query
improve states machine code
add service layer