add last book function