updated init.r as per suggestion by @chahu