added resume functionality