Added code for reversing word in string