table count re-added
table output improved