Function instead of 4 rewrites.