Lib: new functions