stable version and new tests added