modified factor() to cover parsing tk_not