created bookinfoController function