First attempt at reverse words problem