rewriting isalt in buildlocationslist() as ternary