clean code and redefine 7seg table