adding solver for reverse words