test and some fixes