new functions for bashlib