don't use ternary operator, not available in python 2.4