working for xsim too