random fun I've written in R