logic added