now the .done function will throw the error when hanppend
add a sleep function