This is odd syntax. Why are you assigning to data inside parentheses? Why not eliminate the parens and make the data=... assignment part of the else block?