Added cells definition.
Added switch code.