added p6capturelex, which really needs reviewing