started to rewrite primary batchfile