add data handler on view