added security for input of the data of a book