adding tests for valid and invalid data