Added logic to Stop and Resume