don't use ternary operator, does not work in python2.4