r: push utils function to library