reorganising snap.R