implemented take/return book logic