function gamma model