Working with select()