fixed bad signature params
fixed incorrect escaping method
added more documentation and better test