moved ampersand to prefix variables, updated count_bin.cc to use doubles