cleaning previous code ; adding initial code that reads the ap counts and contention periods