modified stats export script