modified cell class and constructor