use of rhino package; print is not defined, create one method to replace it; added analyse function
improved the simple example in analyse