new tests & bug corrections