finalized cleaned version of getResults