Updated code for Challenge No 1