completed implmentation for adding statistics to feature matrix