changed 3seq.cmd.R so only relevant code is contained