Calculating statistics in constructor rather than in the view setup