helper tools for the R# programming