modified Cell.java