+some tests +some fixes