added tpid filtering and user selection