updated code

updated code