copy paster stuff, getting a hang of poll()