improvement the code