added new refactor based sim