added check for completed counts and logic to turn edit on/off