added resume function