Improve code