writing libraries