updated roundgin functions