edited code
updated the code