hist compiles. added a test. working out bugs still