Added code for getting sentences