better cell css class assignment