Improve codes