use format strings instead of if clauses