use constants for 'end' and 'value'