Merge pull request #149 from bhattigurjot/master

implements scripting through functions