move initialize function to separate file
add pluggable async