made SetData() accept an interface for mvc framework