Updated lib and example