added solution to word reverse