starting with test and some other fixes