fixes and unit tests recreated