move headers and add cmakelists
change from average to algorithm