fixed segfault if no measurements are available
add test for multipying accumulators by constant
improved tests