added usefull stuff to my misc R file