fix for bug and a new test!
all tests passing