Improve previous commit's code