Extract tmps to methods