works

all test cases should pass