added better documentation and example scripts