added ability to select events in a time range of a specific type; also added exception for trying to append nil events