adds table and some ugly code
adds table and some ugly code and everything else