make the get words function right