fit functions and simulation framework
change function names