changed flags to suspend and resume