improvement of code