adding output folders, updated python code