refactor Cell class