added the printr for res2 variable