inserting stats into db