improve reference api process usage and ruby testing