1- library functions added but not tested extensively. 2- minor modifications to node and mainclass to support the libraryfunctions