refactor celltable to class