added na.rm=T; no changes to layers