Imporved Code