added preference direction parameter