fixed more syntax errors
use sync callback