numbers using html table and minor refactoring