refactored edit cells