remove function now returns a boolean