more test and some fixes