Added example for writing/using a library