move trial param setting logic to main protocol; safely check for int
moving safe int convert to function