word switching functionality added