make stats page more flexible