The pronunciation of the -s ending depends on the sound that comes before it in the word.