added 'else' in the sample.