this method is basically the same than what's in `delete`, it's probably possible to factorize this a little more, and have only a method reference here