new python code;
better docs