update logic added