Add new functions to genlib

Add new functions to genlib