Bug fix, improved sample, added feature