new logic added