Added virtual methods to handle pause and resume in the states