fixed bug @ listner calls, and added new global function