revise parameter checking codes for consistency with madmark