add more captured data, and make some functions more flexiable