more tests added + minor fixes