made functions memory safe
updated README.md for version 2
updated package