add capture spec
add off spec and fix some bugs