Added welight tests
updated patlib.py