data and code for stats