fixed build and added more tests