implements removeItem for removing items from a list