change invalid and valid to call view methods