get rid of periods at the end of list elements