Improve implementation