my own tools in R