Implements the select events