What happend when people arrived at Ellis Island?

the were checked to see if the had any "bad plans" for America or if they were healthy enough to support themselves