added conditions(if,else) for cells 1