final testing and some fixes