added test and fixed some bugs
Merge branch 'master' of https://github.com/OrenBochman/WRAP