worked and added some more tests