improved library example
tutorial example no. 5