Set of utility functions for R