removeElement function

added a function to remove specified element from training