refactor for saveResults