add stat class and cleanup fetch for the data