This is a little hard to read; could you change it around so that the ternary is first?