added getPermalink to model