Update Lib.java

added many functions