some fixes and version 3.1