Converted to an actual R package