need to think about callback in the select loop