adding capture file and réencoding all the the code to fix troubleshooting compilation