clean and generalize
clean and generalize