continue work on simplifying functions