changed X2params from function to code snippet