removed console.log debug output
added another failure state to catch for resubmitting request
fixed option handling