Impementation of library and example