make function static
Add Working script and better LICENSE and some documentation