submit to CRAN

added some documentation and helper functions