adding ToA extraction logic