Enhanced solution to store 'results' instead of a single result. Removed some console logs.