hackish snakefile; needs refactoring, but works