Added basic statistics calculation