warning updated and test added