adding flaging system