Added R1 as a temporary file to run k as a scalar