moved model class into script because CentOS can't handle it