Implemented better method removing rejected elements.