finished the basic design and refactor to table layout