enhanced tests & bug fixes