Improve constant algo