new impl almost done :-) added test cases