finished main valid and invalid methods