deleteRange function for eventstore and study