work on tests and fixes