use python conditional expressions