added stats table, bug fixes