Rename value var
Reuse code for reduce duplication