updated to use ducktyping in remove method