refactored position variables in cell