How about defining toEnd as constant.