save results in path depending on input