simplifying # of functions