adjust the function to make more precise capture