Created different constructors for joinview.