With constants and modified code structure