Adding model function for revisions