centered table, set up append onclick function