updated tests and got it working