read input from books