The loop isn't adding a to the result list, not sure why.