built the add book functionality