updated to include statistics gem