some renaming and tring to add roxygen2 documentation