Commit book function