add err callback
add public prop
sorry, some draft
fix merge