better checking for previous runs