add additional tests and fix