functions added from jbntools