Modified class function