fix tests and use rfactor