some additional logic added