Adding add state method for view.