js added for book functions