added logic for a failed state..