added select.select() implementation