small changes for pythoon interface, now tested