change var name of res to match