added removal handling and makde some updates