added function for removing list elements