added support for removing by foreign id