fixes, tests added