modified library.php