redid break a little bit so as not to use gets