changed async on javascript