changed main simulation function calls to functional programming style