add async hook support. Closes #43