add tests
streamline bits and add dependencies