add a function for when-statement of X10