working on R model